#ifndef BOOKMARKSDOCKWIDGET_H
#define BOOKMARKSDOCKWIDGET_H

#include <QDockWidget>
#include <QModelIndex>

namespace Ui
{
class BookmarksDockWidget;
}

class QUrl;

class BookmarksManager;
class BookmarksModel;

class BookmarksDockWidget : public QDockWidget
{
    Q_OBJECT

signals:
    void openUrl(const QUrl &url);
    
public:
    explicit BookmarksDockWidget(BookmarksManager *manager, QWidget *parent = 0);
    ~BookmarksDockWidget();

    enum NodeType
    {
        NT_IsLink,
        NT_IsDir
    };

    enum TemlateType
    {
        TT_CurrentTemplate,
        TT_UserSetTemplate
    };

private slots:
    void customContextMenuRequested(const QPoint &pos);

    void open();

    void process(const QModelIndex &index/*, BookmarksDockWidget::NodeType nodeType, BookmarksDockWidget::TemlateType templateType*/);
    
private:
    Ui::BookmarksDockWidget *ui;
    BookmarksManager *m_bookmarksManager;
    BookmarksModel *m_bookmarksModel;
};

#endif // BOOKMARKSDOCKWIDGET_H
